#include "stm32f10x_gpio.h"
#include "stm32f10x_i2c.h"
#include "stm32f10x_rcc.h"


#define I2C_BUF_WR_SIZE 40  // bytes, the buffer storing the bytes is going to be sent.


void I2C1_Config(void);
void I2C1_StartWrite(u8 slave_addr);
void I2C1_SendData(u8 data);
void I2C1_Stop(void);
void I2C1_WriteByte(u8 slave_addr, u8 data);
void I2C1_WriteBytes(u8 slave_addr, u8 data[], u16 len);
void I2C1_BufClear(void);
void I2C1_BufWriteByte(u8 data);
void I2C1_BufFlush(u8 slave_addr);

